<?php 
echo $this->Html->script('jquery.bxSlider.min');
if(count($ad) > 0) { ?>	
	<ul id="ad-slider-ul" style="padding:0; margin:0">
		<?php foreach($ad as $item) : ?>
			<li>				
				<a href="<?php echo $item['Picture']['link']; ?>" target="_blank">
				<?php 
					echo $html->image( IMG_URL .'pictures/'. $item['Picture']['image_link'], 
							array( 
								'style'     => 'width:175px; height:100px',
								'align'		=> 'center'
						)
					);
				?>
				</a>
			</li>
		<?php endforeach; ?>
	</ul>	
<?php } ?>

<script type="text/javascript">
	
	$(document).ready(function(){	
		$("ul#ad-slider-ul").bxSlider({
			mode: 'vertical',
			auto: true,
			pager: false,
			nextText: '',
			prevText: '',
			pause: 6000,
			autoHover: true
		});
	});					
	</script>